<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class BaseController extends Controller
{
    //
    public function __construct()
    {
        $this->middleware('admin.auth');
    }

    /**
     * json回复
     * @param  [type] $status [description]
     * @param  [type] $msg    [description]
     * @param  [type] $url    [description]
     * @param  array  $arr    [description]
     * @return [type]         [description]
     */
    public function responseJson($status, $msg, $url = '', $arr = [])
    {
        return response()->json([
            'status' => $status,
            'msg'    => $msg,
            'url'    => $url,
            'data'   => $arr
        ]);
    }

}
